const {chromium,firefox} = require('playwright');

(async () => {
  console.time('chrome2');
  const browser = await chromium.launch({headless: true});
  const page = await browser.newPage();
  await page.goto('https://www.baidu.com/');
  await page.type('#kw', '加强民航安全隐患排查2');
  await page.click('#su');
  // await page.waitForLoadState('domcontentloaded');
  // await page.waitForNavigation();
  await page.waitForSelector('#content_left > div');
  let eles = await page.$$('#content_left > div');
  console.log(eles.length);
  console.timeEnd('chrome2');
  browser.close();
})();
